import { createRouter, createWebHistory } from 'vue-router'
export const routers = [
  {
    path: '/layout/user',
    meta: {
      title: '用户信息',
      icon: 'User'
    },
    component: () => import('@/views/Layout/User/index.vue'),
    children: [
      {
        path: '/layout/user/userlist',
        meta: {
          title: '用户信息',
        },
        component: () => import('@/views/Layout/User/UserList/index.vue'),
      }, {
        path: '/layout/user/phlist',
        meta: {
          title: '手机用户',
        },
        component: () => import('@/views/Layout/User/PhList/index.vue'),
      }
    ]
  },
  {
    path: '/layout/zb',
    meta: {
      title: '直播管理',
      icon: 'DataLine'
    },
    component: () => import('@/views/Layout/Zb/index.vue'),
    children: [
      {
        path: '/layout/zb/userlist',
        meta: {
          title: '用户信息',
        },
        component: () => import('@/views/Layout/Zb/UserList/index.vue'),
      }, {
        path: '/layout/zb/phlist',
        meta: {
          title: '手机管理',
        },
        component: () => import('@/views/Layout/Zb/PhList/index.vue'),
      },
    ]
  },
  {
    path: '/layout/bb',
    meta: {
      title: '版本',
      icon: 'KnifeFork'
    },
    component: () => import('@/views/Layout/Bb/index.vue'),
  }
]
const routes = [
  {
    path: '/',
    meta: {
      title: '默认'
    },
    redirect: '/layout'
  },
  {
    path: '/layout',
    meta: {
      title: '布局'
    },
    component: () => import('@/views/Layout/index.vue'),
    children: routers
  }
]
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
})

export default router
